import { prop } from "@typegoose/typegoose";
import {hashSync} from 'bcryptjs'
export class User{

   @prop()
   username:string


   @prop({
        select:false,
        set(val){

            return val&&hashSync(val)
        },
        get(val){
        return val
        }
   })
   password:string

   @prop()
   email:string

   @prop()
   avatar:string

   @prop()
   nike:string

}